package com.molichuxing.gateway.bff.stock.services;

import java.util.List;
import java.util.Map;

import com.molichuxing.framework.dto.Paged;
import com.molichuxing.gateway.bff.stock.entity.request.modify.StockCarModifyVo;
import com.molichuxing.gateway.bff.stock.entity.response.StockCarDetailVo;
import com.molichuxing.gateway.bff.stock.entity.response.StockCarStockVo;
import com.molichuxing.gateway.bff.stock.entity.response.StockCarVo;
import com.molichuxing.gateway.utils.entity.UserEntity;
import com.molichuxing.services.business.dto.response.StockCarBizDto;

/**
 * 
 * @author liyg
 * 库存车辆bff服务
 * 2019-08-26
 *
 */
public interface StockCarBffService {

	/**
	 *库存车辆列表
	 * @param map 参数
	 *key:tabType       Integer    tab类型
	 *key:vin            String    车架号 非必填
	 *key:licencePlate   String    车牌号 非必填
	 *key:operationState Integer   运营状态 非必填
	 *key:vehicleId  Integer 车型id 非必填
	 *key:type       Integer 出入库类型 非必填
	 *key:stockType       Integer 库类型（中转库或门店）非必填
	 *key:stockId    Integer 中转库id 非必填
	 *key:startTime  LocalDateTime 开始时间 非必填
	 *key:endTime    LocalDateTime 结束时间 非必填
	 *key:sortName   String 排序字段 
	 *key:sortWay    String 排序方式 
	 *key:pageNum    Integer 当前页
	 *key:pageSize   Integer 每页显示条数
	 * @return
	 * @throws Exception 
	 */
	Paged<StockCarVo> getStockCarList(Map<String,Object> map)throws Exception;
	
	/**
	 * 获取库存车辆详情
	 * 
	 * @param carId
	 * @return
	 * @throws Exception 
	 */
	StockCarVo getStockCar(Integer carId) throws Exception;
	
	/**
	 * 获取库存车辆详情
	 * 
	 * @param carId
	 * @return
	 * @throws Exception 
	 */
	StockCarDetailVo getStockCarDetail(Integer carId) throws Exception;
	
	/**
	 * 车辆入库
	 * 
	 * @param modifyVo
	 * @return
	 * @throws Exception
	 */
	Boolean modifyInStock(StockCarModifyVo modifyVo)throws Exception;
	
	/**
	 * 车辆出库
	 * 
	 * @param modifyVo
	 * @return
	 * @throws Exception
	 */
	Boolean modifyOutStock(StockCarModifyVo modifyVo)throws Exception;
	
	/**
	 * 确认回库
	 * 
	 * @param modifyVo
	 * @return
	 * @throws Exception
	 */
	Boolean modifyCollectStoreStock(StockCarModifyVo modifyVo)throws Exception;
	
	/**
	 * 收车 车到中转库
	 * 
	 * @param modifyVo
	 * @return
	 * @throws Exception
	 */
	Boolean modifyCollectStock(StockCarModifyVo modifyVo)throws Exception;
	
	/**
	 * 获取库存车辆信息
	 * @param map
	 *            licencePlate(车牌) 
	 *            vin（车架号） 
	 *            vehicleId（车型）
	 *            vehicleType（车辆类型） 
	 *            status（运营状态）
	 * @return
	 * @throws Exception
	 */
	Paged<StockCarStockVo> getStockCarPage(Map<String,Object> map)throws Exception;
	
	/**
	 *库存车辆列表
	 * @param map 参数
	 *key:tabType        Integer    tab类型
	 *key:ids            List 	      库存id集合
	 *key:vin            String    车架号 非必填
	 *key:licencePlate   String    车牌号 非必填
	 *key:operationState Integer   运营状态 非必填
	 *key:vehicleId  Integer 车型id 非必填
	 *key:type       Integer 出入库类型 非必填
	 *key:stockType       Integer 库类型（中转库或门店）非必填
	 *key:stockId    Integer 中转库id 非必填
	 *key:startTime  LocalDateTime 开始时间 非必填
	 *key:endTime    LocalDateTime 结束时间 非必填
	 * @return
	 * @throws Exception 
	 */
	List<StockCarVo> getStockCarDownloadList(Map<String, Object> map)throws Exception;
	
	/**
	 * 查询导出总条数
	 * @param map
	 * @return
	 */
    Long getStockCarDownloadListCount(Map<String, Object> map);
    
    /**
     * 仓储作业信息导出发送邮件
     * @param map
     * @param user
     * @return
     */
    Boolean getStockCarDownloadListEmail(Map<String, Object> map,UserEntity user);
}
